/**
 * ...
 * @author Krzysztof Rozalski
 */

package test;
import hapi.unit.HapiTestCase;

using hapi.physics.PhysicsFactoryMethods;

class TestTime extends HapiTestCase {

	public function testConstructor() {
		var tenSeconds = 10.seconds();
		var twoHours = 2.hours();
		var fiveMillis = 5.millis();
		var oneMinute = 1.minutes();
		assertEquals(10.0, tenSeconds.seconds);
		assertEquals(2.0, twoHours.hours);
		assertEquals(5, fiveMillis.millis);
		assertEquals(1.0, oneMinute.minutes);
	}
	
	public function testConversion() {
		var t = 120.seconds();
		assertEquals(120000, t.millis);
		assertEquals(2.0, t.minutes);
		assertEquals(1/30, t.hours);
	}
	
}